package com.kingdee.eas.custom.rcbudget.app;

import javax.ejb.*;
import java.rmi.RemoteException;
import com.kingdee.bos.*;
import com.kingdee.bos.util.BOSObjectType;
import com.kingdee.bos.metadata.IMetaDataPK;
import com.kingdee.bos.metadata.rule.RuleExecutor;
import com.kingdee.bos.metadata.MetaDataPK;
//import com.kingdee.bos.metadata.entity.EntityViewInfo;
import com.kingdee.bos.framework.ejb.AbstractEntityControllerBean;
import com.kingdee.bos.framework.ejb.AbstractBizControllerBean;
//import com.kingdee.bos.dao.IObjectPK;
import com.kingdee.bos.dao.IObjectValue;
import com.kingdee.bos.dao.IObjectCollection;
import com.kingdee.bos.service.ServiceContext;
import com.kingdee.bos.service.IServiceContext;
import com.kingdee.eas.framework.Result;
import com.kingdee.eas.framework.LineResult;
import com.kingdee.eas.framework.exception.EASMultiException;
import com.kingdee.bos.dao.ormapping.ObjectUuidPK;

import java.lang.String;
import com.kingdee.eas.common.EASBizException;
import com.kingdee.bos.dao.IObjectPK;
import com.kingdee.eas.custom.rcbudget.ContractBillStateEnum;
import java.util.ArrayList;



public abstract class AbstractContractBillFacadeControllerBean extends AbstractBizControllerBean implements ContractBillFacadeController
{
    protected AbstractContractBillFacadeControllerBean()
    {
    }

    protected BOSObjectType getBOSType()
    {
        return new BOSObjectType("D2EFD480");
    }

    public void audit(Context ctx, IObjectPK pk, ContractBillStateEnum state, String tableName, String fieldName, String auditUserId) throws BOSException, EASBizException
    {
        try {
            ServiceContext svcCtx = createServiceContext(new MetaDataPK("b336d763-0186-4f9c-9de0-e6b3729a618b"), new Object[]{ctx, pk, state, tableName, fieldName, auditUserId});
            invokeServiceBefore(svcCtx);
              if(!svcCtx.invokeBreak()) {
            _audit(ctx, pk, state, tableName, fieldName, auditUserId);
            }
            invokeServiceAfter(svcCtx);
        } catch (BOSException ex) {
            throw ex;
        } catch (EASBizException ex0) {
            throw ex0;
        } finally {
            super.cleanUpServiceState();
        }
    }
    protected void _audit(Context ctx, IObjectPK pk, ContractBillStateEnum state, String tableName, String fieldName, String auditUserId) throws BOSException, EASBizException
    {    	
        return;
    }

    public void unAudit(Context ctx, IObjectPK pk, ContractBillStateEnum state, String tableName, String fieldName) throws BOSException, EASBizException
    {
        try {
            ServiceContext svcCtx = createServiceContext(new MetaDataPK("37564161-1477-43e5-a050-3d5b3fad2f5c"), new Object[]{ctx, pk, state, tableName, fieldName});
            invokeServiceBefore(svcCtx);
              if(!svcCtx.invokeBreak()) {
            _unAudit(ctx, pk, state, tableName, fieldName);
            }
            invokeServiceAfter(svcCtx);
        } catch (BOSException ex) {
            throw ex;
        } catch (EASBizException ex0) {
            throw ex0;
        } finally {
            super.cleanUpServiceState();
        }
    }
    protected void _unAudit(Context ctx, IObjectPK pk, ContractBillStateEnum state, String tableName, String fieldName) throws BOSException, EASBizException
    {    	
        return;
    }

    public void abandon(Context ctx, IObjectPK pk, ContractBillStateEnum state, String tableName, String fieldName) throws BOSException, EASBizException
    {
        try {
            ServiceContext svcCtx = createServiceContext(new MetaDataPK("635489fc-3187-4e65-abb8-74686d1ef2ef"), new Object[]{ctx, pk, state, tableName, fieldName});
            invokeServiceBefore(svcCtx);
              if(!svcCtx.invokeBreak()) {
            _abandon(ctx, pk, state, tableName, fieldName);
            }
            invokeServiceAfter(svcCtx);
        } catch (BOSException ex) {
            throw ex;
        } catch (EASBizException ex0) {
            throw ex0;
        } finally {
            super.cleanUpServiceState();
        }
    }
    protected void _abandon(Context ctx, IObjectPK pk, ContractBillStateEnum state, String tableName, String fieldName) throws BOSException, EASBizException
    {    	
        return;
    }

    public void allAbandon(Context ctx, ArrayList pks, ContractBillStateEnum state, String tableName, String fieldName) throws BOSException
    {
        try {
            ServiceContext svcCtx = createServiceContext(new MetaDataPK("02cdfcb8-6406-451b-8ff0-577c9768844e"), new Object[]{ctx, pks, state, tableName, fieldName});
            invokeServiceBefore(svcCtx);
              if(!svcCtx.invokeBreak()) {
            _allAbandon(ctx, pks, state, tableName, fieldName);
            }
            invokeServiceAfter(svcCtx);
        } catch (BOSException ex) {
            throw ex;
        } finally {
            super.cleanUpServiceState();
        }
    }
    protected void _allAbandon(Context ctx, ArrayList pks, ContractBillStateEnum state, String tableName, String fieldName) throws BOSException
    {    	
        return;
    }

    public void dataMigration(Context ctx) throws BOSException, EASBizException
    {
        try {
            ServiceContext svcCtx = createServiceContext(new MetaDataPK("078aec79-4b8d-40ee-9aa6-ac8753213d7a"), new Object[]{ctx});
            invokeServiceBefore(svcCtx);
              if(!svcCtx.invokeBreak()) {
            _dataMigration(ctx);
            }
            invokeServiceAfter(svcCtx);
        } catch (BOSException ex) {
            throw ex;
        } catch (EASBizException ex0) {
            throw ex0;
        } finally {
            super.cleanUpServiceState();
        }
    }
    protected void _dataMigration(Context ctx) throws BOSException, EASBizException
    {    	
        return;
    }

    public void saleOption(Context ctx) throws BOSException, EASBizException
    {
        try {
            ServiceContext svcCtx = createServiceContext(new MetaDataPK("dd1df0bc-8ada-4b2d-8317-cb25ad4dd34d"), new Object[]{ctx});
            invokeServiceBefore(svcCtx);
              if(!svcCtx.invokeBreak()) {
            _saleOption(ctx);
            }
            invokeServiceAfter(svcCtx);
        } catch (BOSException ex) {
            throw ex;
        } catch (EASBizException ex0) {
            throw ex0;
        } finally {
            super.cleanUpServiceState();
        }
    }
    protected abstract void _saleOption(Context ctx) throws BOSException, EASBizException;

}